<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WB32L003 Standard Peripherals Firmware Library: wb32l003_flash.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">WB32L003 Standard Peripherals Firmware Library
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6d2d5b60bd20db849a9486835a2715aa.html">Libraries</a></li><li class="navelem"><a class="el" href="dir_5ec8cccc32fa528457f3b4ed28e1a2cf.html">WB32L003_StdPeriph_Driver</a></li><li class="navelem"><a class="el" href="dir_5de9c861c65ef79c1ee42b85520795c1.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wb32l003_flash.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This file provides all the FLASH firmware functions.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="wb32l003__flash_8h_source.html">wb32l003_flash.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="wb32l003__rcc_8h_source.html">wb32l003_rcc.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaf028272f7adbab08e95801d0af556f80"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FLASH_OP_READ</b>&#160;&#160;&#160;(0x00000000)</td></tr>
<tr class="separator:gaf028272f7adbab08e95801d0af556f80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae9f0dcc2235305bd9abba09b23134b68"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FLASH_OP_PROGRAM</b>&#160;&#160;&#160;(FLASH_CR_OP_0)</td></tr>
<tr class="separator:gae9f0dcc2235305bd9abba09b23134b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35d4701049ed68591aa3721be763e682"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FLASH_OP_SECTORERASE</b>&#160;&#160;&#160;(FLASH_CR_OP_1)</td></tr>
<tr class="separator:ga35d4701049ed68591aa3721be763e682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7251e65a1ffe8e034e3a8a07b08df9a"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FLASH_OP_CHIPERASE</b>&#160;&#160;&#160;(FLASH_CR_OP_0 | FLASH_CR_OP_1)</td></tr>
<tr class="separator:gaf7251e65a1ffe8e034e3a8a07b08df9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac24e4dc31d2169d862d5aa3912ca3611"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DUMMY_ADDERSS</b>&#160;&#160;&#160;(0x00002000)</td></tr>
<tr class="separator:gac24e4dc31d2169d862d5aa3912ca3611"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fc5258fad26a2225b045a59bb32c8d9"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DUMMY_DATA</b>&#160;&#160;&#160;(0x5555AAAA)</td></tr>
<tr class="separator:ga5fc5258fad26a2225b045a59bb32c8d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacaff2d6333c831e1f2f2fb1e4be5bc35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#gacaff2d6333c831e1f2f2fb1e4be5bc35">FLASH_OP_Unlock</a> (uint32_t PageAddr)</td></tr>
<tr class="memdesc:gacaff2d6333c831e1f2f2fb1e4be5bc35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the FLASH Page Erase/Write access.  <a href="group___f_l_a_s_h___private___functions.html#gacaff2d6333c831e1f2f2fb1e4be5bc35">More...</a><br /></td></tr>
<tr class="separator:gacaff2d6333c831e1f2f2fb1e4be5bc35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8eda1dd6e3928e88c40e2a1e54bac64"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#gad8eda1dd6e3928e88c40e2a1e54bac64">FLASH_OP_Lock</a> (uint32_t PageAddr)</td></tr>
<tr class="memdesc:gad8eda1dd6e3928e88c40e2a1e54bac64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the FLASH Page Erase/Write access.  <a href="group___f_l_a_s_h___private___functions.html#gad8eda1dd6e3928e88c40e2a1e54bac64">More...</a><br /></td></tr>
<tr class="separator:gad8eda1dd6e3928e88c40e2a1e54bac64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4084d0184bab463a1579271bf474aaef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga4084d0184bab463a1579271bf474aaef">FLASH_Unlock</a> (void)</td></tr>
<tr class="memdesc:ga4084d0184bab463a1579271bf474aaef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the FLASH controller register write-protect.  <a href="group___f_l_a_s_h___private___functions.html#ga4084d0184bab463a1579271bf474aaef">More...</a><br /></td></tr>
<tr class="separator:ga4084d0184bab463a1579271bf474aaef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga46899557353c4312ddbe3f25e65df1d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga46899557353c4312ddbe3f25e65df1d8">FLASH_Lock</a> (void)</td></tr>
<tr class="memdesc:ga46899557353c4312ddbe3f25e65df1d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the FLASH controller register write-protect.  <a href="group___f_l_a_s_h___private___functions.html#ga46899557353c4312ddbe3f25e65df1d8">More...</a><br /></td></tr>
<tr class="separator:ga46899557353c4312ddbe3f25e65df1d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94c1e51a9c3bf8d48eb6eb4a4d054861"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga94c1e51a9c3bf8d48eb6eb4a4d054861">FLASH_ITConfig</a> (uint32_t FLASH_IT, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga94c1e51a9c3bf8d48eb6eb4a4d054861"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified FLASH interrupts.  <a href="group___f_l_a_s_h___private___functions.html#ga94c1e51a9c3bf8d48eb6eb4a4d054861">More...</a><br /></td></tr>
<tr class="separator:ga94c1e51a9c3bf8d48eb6eb4a4d054861"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdabeceeb7c2b03a55da23464ed03cf7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#gabdabeceeb7c2b03a55da23464ed03cf7">FLASH_ClearITPendingBit</a> (uint32_t FLASH_IT)</td></tr>
<tr class="memdesc:gabdabeceeb7c2b03a55da23464ed03cf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the specified FLASH interrupt flag.  <a href="group___f_l_a_s_h___private___functions.html#gabdabeceeb7c2b03a55da23464ed03cf7">More...</a><br /></td></tr>
<tr class="separator:gabdabeceeb7c2b03a55da23464ed03cf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3acdf4187f1bdaea4c91d9e2ae44647e"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga3acdf4187f1bdaea4c91d9e2ae44647e">FLASH_GetITStatus</a> (uint32_t FLASH_IT)</td></tr>
<tr class="memdesc:ga3acdf4187f1bdaea4c91d9e2ae44647e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified FLASH interrupt has occurred or not.  <a href="group___f_l_a_s_h___private___functions.html#ga3acdf4187f1bdaea4c91d9e2ae44647e">More...</a><br /></td></tr>
<tr class="separator:ga3acdf4187f1bdaea4c91d9e2ae44647e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga272a03dfca95d60ff6b5b28cd7d532c5"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga272a03dfca95d60ff6b5b28cd7d532c5">FLASH_GetFlagStatus</a> (uint32_t Flag)</td></tr>
<tr class="memdesc:ga272a03dfca95d60ff6b5b28cd7d532c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified FLASH flag is set or not.  <a href="group___f_l_a_s_h___private___functions.html#ga272a03dfca95d60ff6b5b28cd7d532c5">More...</a><br /></td></tr>
<tr class="separator:ga272a03dfca95d60ff6b5b28cd7d532c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ad803999ae93ec03700983c59cae264"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga2ad803999ae93ec03700983c59cae264">FLASH_WaitForLastOperation</a> (uint32_t Timeout)</td></tr>
<tr class="memdesc:ga2ad803999ae93ec03700983c59cae264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for a FLASH operation to complete.  <a href="group___f_l_a_s_h___private___functions.html#ga2ad803999ae93ec03700983c59cae264">More...</a><br /></td></tr>
<tr class="separator:ga2ad803999ae93ec03700983c59cae264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga83107c4faee4e675e1a021c2530c9970"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga83107c4faee4e675e1a021c2530c9970">FLASH_ProgramByte</a> (uint32_t Addr, uint8_t Data)</td></tr>
<tr class="memdesc:ga83107c4faee4e675e1a021c2530c9970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program a byte (8-bit) at a specified address.  <a href="group___f_l_a_s_h___private___functions.html#ga83107c4faee4e675e1a021c2530c9970">More...</a><br /></td></tr>
<tr class="separator:ga83107c4faee4e675e1a021c2530c9970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad53043f7548575b094741497d9a54eb1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#gad53043f7548575b094741497d9a54eb1">FLASH_ProgramHalfWord</a> (uint32_t Addr, uint16_t Data)</td></tr>
<tr class="memdesc:gad53043f7548575b094741497d9a54eb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program a half-word (16-bit) at a specified address.  <a href="group___f_l_a_s_h___private___functions.html#gad53043f7548575b094741497d9a54eb1">More...</a><br /></td></tr>
<tr class="separator:gad53043f7548575b094741497d9a54eb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2d3631c3b2ce41eba346ce71c922424"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#gac2d3631c3b2ce41eba346ce71c922424">FLASH_ProgramWord</a> (uint32_t Addr, uint32_t Data)</td></tr>
<tr class="memdesc:gac2d3631c3b2ce41eba346ce71c922424"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program a word (32-bit) at a specified address.  <a href="group___f_l_a_s_h___private___functions.html#gac2d3631c3b2ce41eba346ce71c922424">More...</a><br /></td></tr>
<tr class="separator:gac2d3631c3b2ce41eba346ce71c922424"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga86ffd9e8dc00f2cde1e1ae767803447a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga86ffd9e8dc00f2cde1e1ae767803447a">FLASH_EraseChip</a> (void)</td></tr>
<tr class="memdesc:ga86ffd9e8dc00f2cde1e1ae767803447a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Full erase of FLASH memory Bank.  <a href="group___f_l_a_s_h___private___functions.html#ga86ffd9e8dc00f2cde1e1ae767803447a">More...</a><br /></td></tr>
<tr class="separator:ga86ffd9e8dc00f2cde1e1ae767803447a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13cd893db6616373129eaae80949fa4d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___f_l_a_s_h.html#gadc63a6f3404ff1f71229a66915e9cdc0">FLASH_Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_l_a_s_h___private___functions.html#ga13cd893db6616373129eaae80949fa4d">FLASH_ErasePage</a> (uint32_t PageAddr)</td></tr>
<tr class="memdesc:ga13cd893db6616373129eaae80949fa4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase the specified FLASH memory page.  <a href="group___f_l_a_s_h___private___functions.html#ga13cd893db6616373129eaae80949fa4d">More...</a><br /></td></tr>
<tr class="separator:ga13cd893db6616373129eaae80949fa4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This file provides all the FLASH firmware functions. </p>
<dl class="section author"><dt>Author</dt><dd>Westberry Application Team </dd></dl>
<dl class="section version"><dt>Version</dt><dd>V0.0.3 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>12-April-2023 </dd></dl>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by Westberry Technology (ChangZhou) Corp., Ltd. All rights reserved.
</small></address>
</body>
</html>
